<!-- directive:title $alert 完整使用说明 -->
<!-- directive:breadcrumb 重要服务 -->
<div class="panel-body">
    <p>目的 : 使常用的弹框简单化 更简单化</p>
    <p>0叹号 1对号 2叉号 3问号 4锁 5哭脸 6笑脸 7叹号重复</p>
    <p>
        <button type="button" class="btn btn-sm btn-default" ng-click="fun20()"> 初体验 </button>
    </p>
    <p>
        <button type="button" class="btn btn-sm btn-info" ng-click="fun1()"> $alert.success() </button>
        <button type="button" class="btn btn-sm btn-success" ng-click="fun2()"> $alert.success("保存成功") </button>
        <button type="button" class="btn btn-sm btn-danger" ng-click="fun3()"> $alert.error() </button>
        <button type="button" class="btn btn-sm btn-danger" ng-click="fun4()"> $alert.error("保存失败") </button>
        <button type="button" class="btn btn-sm btn-default" ng-click="fun5()"> $alert.msg("自定义", {icon:3}) </button>
    </p>
    <script type='text/xian' ui-bs>
        $scope.fun1 = function (){ $alert.success() };
        $scope.fun2 = function (){ $alert.success("保存成功") };
        $scope.fun3 = function (){ $alert.error() };
        $scope.fun4 = function (){ $alert.error("保存失败") };
        $scope.fun5 = function (){ $alert.msg('自定义', {icon:3}) };
    </script>
    <p>
        <button type="button" class="btn btn-sm btn-success" ng-click="fun6()"> $alert.success("保存成功", 回调) </button>
        <button type="button" class="btn btn-sm btn-danger" ng-click="fun7()"> $alert.error("保存失败", 回调) </button>
        <button type="button" class="btn btn-sm btn-danger" ng-click="fun8()"> $alert.warning("服务器过热") </button>
        <button type="button" class="btn btn-sm btn-info" ng-click="fun9()"> $alert.info("请注意天黑了狼来了", 回调) </button>
    </p>
    <script type='text/xian' ui-bs>
        $scope.fun6 = function (){ $alert.success('保存成功', function(close){$alert.msg('成功');close()}) };
        $scope.fun7 = function (){ $alert.error('保存失败', function(close){$alert.msg('失败');close()}) };
        $scope.fun8 = function (){ $alert.warning('服务器过热') };
        $scope.fun9 = function (){ $alert.info('请注意天黑了狼来了', function(close){$alert.msg('请注意天黑了狼来了');close()}) };
    </script>
    <p>
        <button type="button" class="btn btn-sm btn-success" ng-click="fun11()">$alert.prompt("请输入你的原因", function)</button>
        <button type="button" class="btn btn-sm btn-danger" ng-click="fun12()">$alert.promptPw("请输入口令", function)</button>
        <button type="button" class="btn btn-sm btn-info" ng-click="fun21()"> $alert.confirm() </button>
    </p>
    <script type='text/xian' ui-bs>
        $scope.fun11 = function (){ $alert.prompt("x", function(text, close){$alert.msg(text);close()}) };
        $scope.fun12 = function (){ $alert.promptPw("x", function(text, close){$alert.msg(text);close()}) };
        $scope.fun21 = function (){ $alert.confirm( "x", function(close){ $alert.success("x"); close() }, function(close){ $alert.error("x"); close() } ) };
    </script>
    <p>
        <button type="button" class="btn btn-sm btn-default" ng-click="fun10()">$alert.open</button>
    </p>
</div>
